#pragma once
#include "CXcpObjectBase.h"
#include "IObject.h"
#include "CXcpObjectThreadSafeAddRefPolicy.h"
#include "CMILMatrix.h"


namespace HWRealizationType
{
	enum Enum
	{
		Cache = 0x0,
		Shape = 0x1,
		Text = 0x2,
	};
};




class HWRealization :
	public CXcpObjectBase<IObject,CXcpObjectThreadSafeAddRefPolicy>
{

public: 
	HWRealization(enum HWRealizationType::Enum);
	enum HWRealizationType::Enum GetType();
	virtual XBOOL NeedsUpdate(const CMILMatrix * pRealizationTransform, XBOOL isTransformAnimating);
	void UpdateRealizationParameters(const CMILMatrix * pRealizationTransform, XBOOL isTransformAnimating, XFLOAT surfaceOffsetX, XFLOAT surfaceOffsetY);
	virtual XFLOAT GetSurfaceOffsetX();
	virtual XFLOAT GetSurfaceOffsetY();
	void GetRealizationScale(XFLOAT * pScaleX, XFLOAT * pScaleY);
	virtual XBOOL HasLostRealizationTexture();
protected: 
	CMILMatrix m_realizationTransform;

	XBOOL m_renderedForAnimation;
	XFLOAT m_surfaceOffsetX;
	XFLOAT m_surfaceOffsetY;
private: 
	enum HWRealizationType::Enum m_realizationType;
};
